package com.hyl.entity;

import lombok.Data;
import org.apache.log4j.Logger;

import javax.sound.midi.Soundbank;
import java.util.Arrays;
import java.util.Map;

/**
 * @Description TODO
 * @Author hyl
 * @Date 2023/4/26 9:56
 **/
@Data
public class User {

	private Logger logger = Logger.getLogger(User.class);

	private String username;
	private String pwd;
	private Integer age;
	private String email;
	private String desc;
	private String[] loves;
	private Map maps;

	private Role role;

	public void show(String tmp){
		logger.info("显示前。。。。");
		System.out.println("姓名："+username+",爱好："+ Arrays.toString(loves));
		System.out.println("角色:"+role.getRoleName());
		int i = 1/0;
		logger.info("显示后。。。。。");
	}

	public User(){}

	public User(String username){
		this.username = username;
	}

	public User(String username, String pwd, Integer age, String email) {
		this.username = username;
		this.pwd = pwd;
		this.age = age;
		this.email = email;
	}
}
